import UIKit

var str = "Hello, playground"

//字符串还可以通过构造方法进行创建
str = String(describing: Int.self)

//其他,通过构造函数进行数据的类型转换
var a = Int(1.05)
var b = Float(a)


var str_01 = "hello"
var str_02 = ","
var str_03 = "world"
var str_04 = str_01 + str_02 + str_03

str_04.count

//"\()"结构可以将其他数据类型转换为字符串进行插入
var int_01 = 111
var str_05 = "\(int_01)数字"


//创建一个字符
var c:Character = "a"
//创建一个字符数组
var cs:[Character] = ["H","E","L","L","O"]

//打印字符数组
cs.forEach { c in
    print(c)
}

//通过构造函数构造字符串
var str_06 = String(cs)

